# coding:utf-8
import json

filename = 'username.json'
try:
    with open(filename) as f:
        username = json.load(f)
        ans = input(f"username：{username} is right(y/n)?")
        if ans == 'n':
            raise FileNotFoundError
except FileNotFoundError:
    username = input("What is your name")
    with open(filename,'w') as f:
        json.dump(username,f)
        print(f"We will remember your name when you come back{username}")
else:
    print(f"Welcome back,{username}")